package org.example.controller;

import jakarta.annotation.Resource;
import org.example.bean.User;
import org.example.service.UserService;
import org.example.util.JsonResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Resource
    private UserService userService;
    @PostMapping("/login")
    public JsonResult login(User user) {
        return userService.login(user);
    }
}
